package com.senven.order.controller.api;

import com.senven.common.entity.Order;
import com.senven.order.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author wt
 * @Date 2022/9/7 9:52
 * @PackageName:com.senven.order.controller.api
 * @ClassName: ApiOrderController
 * @Description: TODO
 * @Version 1.0
 */
@RestController
@RequestMapping("/api/order")
public class ApiOrderController {
    @Autowired
    private IOrderService orderService;

    @PostMapping("/insertOrder")
    public String inesrtOrder(@RequestBody Order order){
        System.out.println(order);
       String i =  orderService.insertOrder(order);
       return i;
    }
}
